seq=train_3

for pngF in *.png; do convert "$pngF" "${pngF%%.*}.tif"; done


echo "make font propertiey ..."
touch font_properties
echo $seq 0 0 0 0 0 > font_properties

echo "Run tesseract for trainning ..."


echo $seq
tesseract $seq.tif $seq nobatch box.train

echo "echo Compute the Character Set.."
unicharset_extractor $seq.box 

:<<!

mftraining -F font_properties -U unicharset $seq.tr

sleep 3



echo "continue trainning ..."
cntraining $seq.tr

mv unicharset $seq.unicharset
mv inttemp $seq.inttemp
mv pffmtable $seq.pffmtable
mv shapetable $seq.shapetable
mv normproto $seq.normproto

echo "build trainning data ..."
combine_tessdata $seq.

!
